home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / utility / iswin.zip / CHKDSK.BAT next >
DOS Batch File  |  1991-07-02  |  1KB  |  33 lines

  1.  
  2.   @Echo OFF
  3.   Rem ChkDsk.Bat  07-02-91  tem
  4.  
  5.   Rem Runs renamed chkdsk to prevent exec under Windows which can corrupt
  6.   Rem files.     Errorlevel 0 if not under Windows; 255 if under Windows.
  7.   Rem Source:
  8.   Rem InfoWorld Magazine; July 1, 1991, page 19 article titled
  9.   Rem Window Manager, by Brian Livingston.
  10.   Rem Debug source code by Fran Finnegan in MS Journal, 3/91.
  11.  
  12.   Rem ----- Set envir pointer to dos dir if not already set...
  13.   If X%dos%==X Set dos=C:\DOS
  14.  
  15.   Rem ----- Point to wherever you put iswin.com...
  16.   %dos%\iswin
  17.         If Errorlevel 255 GOTO @WIN
  18.  
  19.   Rem ----- Point to wherever you put chkdsk33 or 40 or 50 or xx...
  20.   %dos%\chkdsk33 %1 %2 %3 %4
  21.  
  22.   GOTO @FINIS
  23.  
  24. :@WIN
  25.   Echo ─────────────────────────────────────────────────────────────────
  26.   Echo You are running under Windows at this time.
  27.   Echo DO NOT run chkdsk while under Windows, or from a shell.
  28.   Echo Chkdsk with /f may handle open files as if they were lost files!
  29.   Echo That could result in fragmenting them into FILE000x.CHK
  30.   Echo files, thus destroying their integrity.
  31.   Echo ─────────────────────────────────────────────────────────────────
  32. :@FINIS
  33.